package com.xbongbong.crm.service;

import com.alibaba.fastjson.JSONObject;
import com.xbongbong.paas.domain.entity.ext.PaasFormDataEntityExt;
import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.pro.searchcustomer.pojo.dto.SearchCustomerAdminDTO;
import com.xbongbong.pro.searchcustomer.pojo.dto.SearchCustomerCallbackDTO;
import com.xbongbong.pro.searchcustomer.pojo.dto.SearchCustomerDTO;
import com.xbongbong.pro.searchcustomer.pojo.dto.SearchCustomerStaffDTO;
import com.xbongbong.pro.searchcustomer.pojo.dto.SearchCustomerTemplateDTO;
import com.xbongbong.pro.searchcustomer.pojo.dto.SearchCustomerUserDTO;
import com.xbongbong.pro.searchcustomer.pojo.dto.SearchEnterpriseDTO;
import com.xbongbong.pro.searchcustomer.pojo.dto.TargetDTO;
import com.xbongbong.pro.searchcustomer.pojo.vo.JumpClueDetailVO;
import com.xbongbong.pro.searchcustomer.pojo.vo.SearchCustomerDataVO;
import com.xbongbong.pro.searchcustomer.pojo.vo.SearchCustomerMealVO;
import com.xbongbong.pro.searchcustomer.pojo.vo.SearchCustomerMsgVO;
import com.xbongbong.pro.searchcustomer.pojo.vo.SearchCustomerTemplateVO;
import com.xbongbong.pro.searchcustomer.pojo.vo.SearchCustomerUserListVO;
import com.xbongbong.pro.searchcustomer.pojo.vo.SearchCustomerVO;

import javax.validation.Valid;

/**
 * @Author shian
 * @create 2019-07-31 18:55
 * @Description
 */
public interface SearchCustomerService {

    /**
     * 注册账号
     * @param searchCustomerDTO
     * @return com.alibaba.fastjson.JSONObject
     * @author 石安
     * @date 2019-08-05
     */
    JSONObject sendRegister(@Valid SearchCustomerDTO searchCustomerDTO) throws XbbException;
    /**
     * 获取开户客户的信息
     * @param searchCustomerCallbackDTO
     * @return com.xbongbong.pro.searchcustomer.pojo.vo.SearchCustomerVO
     * @author 石安
     * @date 2019-08-01
     */
    SearchCustomerVO getCustomerInfo(@Valid SearchCustomerCallbackDTO searchCustomerCallbackDTO) throws XbbException;

    /**
     * 登录搜客应用
     * @param searchCustomerDTO
     * @return com.xbongbong.pro.searchcustomer.pojo.vo.SearchCustomerVO
     * @author 石安
     * @date 2019-08-02
     */
    SearchCustomerVO loginSearchCustomer(@Valid SearchCustomerDTO searchCustomerDTO) throws XbbException;

    /**
     *  获取线索信息
     * @param searchCustomerCallbackDTO
     * @param targetDTO
     * @return com.xbongbong.pro.searchcustomer.pojo.vo.SearchCustomerVO
     * @author 石安
     * @date 2019-08-05
     */
    SearchCustomerVO notifyInfo(@Valid SearchCustomerCallbackDTO searchCustomerCallbackDTO, @Valid TargetDTO targetDTO) throws XbbException;

    /**
     * 前端获取搜客转过来的数据
     * @param searchCustomerDTO
     * @return com.xbongbong.pro.searchcustomer.pojo.vo.SearchCustomerDataVO
     * @author 石安
     * @date 2019-08-20
     */
    SearchCustomerDataVO notice(@Valid SearchCustomerDTO searchCustomerDTO) throws XbbException;

    /**
     * 绑定用户
     * @param searchCustomerDTO
     * @return com.alibaba.fastjson.JSONObject
     * @author 石安
     * @date 2019-08-05
     */
    JSONObject bind(@Valid SearchCustomerDTO searchCustomerDTO) throws XbbException;

    /**
     * 升级或续费
     * @param searchCustomerDTO
     * @return com.alibaba.fastjson.JSONObject
     * @author 石安
     * @date 2019-08-05
     */
    JSONObject meal(@Valid SearchCustomerDTO searchCustomerDTO) throws XbbException;

    /**
     * 解绑用户
     * @param searchCustomerDTO
     * @return com.alibaba.fastjson.JSONObject
     * @author 石安
     * @date 2019-08-05
     */
    JSONObject unbind(@Valid SearchCustomerDTO searchCustomerDTO) throws XbbException;

    /**
     * 查询（主/子）账号信息
     * @param searchCustomerDTO
     * @return com.alibaba.fastjson.JSONObject
     * @author 石安
     * @date 2019-08-05
     */
    JSONObject info(@Valid SearchCustomerDTO searchCustomerDTO) throws XbbException;

    /**
     * 查看主/子账户套餐信息
     * @param searchCustomerDTO
     * @return com.alibaba.fastjson.JSONObject
     * @author 石安
     * @date 2019-09-17
     */
    JSONObject userPackage(@Valid SearchCustomerDTO searchCustomerDTO) throws XbbException;

    /**
     * 禁用或者启用用户使用搜客
     * @param searchCustomerDTO
     * @return com.alibaba.fastjson.JSONObject
     * @author 石安
     * @date 2019-09-16
     */
    JSONObject enable(@Valid SearchCustomerDTO searchCustomerDTO) throws XbbException;

    /**
     * 注销搜客用户
     * @param searchCustomerDTO
     * @return com.alibaba.fastjson.JSONObject
     * @author 石安
     * @date 2019-08-27
     */
    JSONObject disuser(@Valid SearchCustomerDTO searchCustomerDTO) throws XbbException;

    /**
     * 获取模糊匹配模板
     * @param searchCustomerTemplateDTO
     * @return com.xbongbong.pro.searchcustomer.pojo.vo.SearchCustomerTemplateVO
     * @author 石安
     * @date 2019-08-05
     */
    SearchCustomerTemplateVO useTemplate(@Valid SearchCustomerTemplateDTO searchCustomerTemplateDTO) throws XbbException;

    /**
     * 保存模糊匹配模板
     * @param searchCustomerTemplateDTO
     * @return com.xbongbong.pro.searchcustomer.pojo.vo.SearchCustomerTemplateVO
     * @author 石安
     * @date 2019-08-05
     */
    SearchCustomerTemplateVO saveTemplate(@Valid SearchCustomerTemplateDTO searchCustomerTemplateDTO) throws XbbException;

    /**
     * 获取员工的搜客权限管理
     * @param searchCustomerUserDTO
     * @return com.xbongbong.pro.searchcustomer.pojo.vo.SearchCustomerUserVO
     * @author 石安
     * @date 2019-08-07
     */
    SearchCustomerUserListVO getDepUserList(@Valid SearchCustomerUserDTO searchCustomerUserDTO) throws XbbException;

    /**
     * 搜客的套餐信息
     * @param searchCustomerUserDTO
     * @return com.xbongbong.pro.searchcustomer.pojo.vo.SearchCustomerMealVO
     * @author 石安
     * @date 2019-08-07
     */
    SearchCustomerMealVO getCompanyMeal(@Valid SearchCustomerUserDTO searchCustomerUserDTO) throws XbbException;

    /**
     * 设置搜客管理员
     * @param searchCustomerAdminDTO
     * @return com.xbongbong.pro.searchcustomer.pojo.vo.SearchCustomerMsgVO
     * @author 石安
     * @date 2019-08-08
     */
    SearchCustomerMsgVO updateAdmin(@Valid SearchCustomerAdminDTO searchCustomerAdminDTO) throws XbbException;

    /**
     * 设置搜客员工
     * @param searchCustomerStaffDTO
     * @return com.xbongbong.pro.searchcustomer.pojo.vo.SearchCustomerMsgVO
     * @author 石安
     * @date 2019-08-08
     */
    SearchCustomerMsgVO updateStaff(@Valid SearchCustomerStaffDTO searchCustomerStaffDTO) throws XbbException;

    /**
     * 企业模糊查询
     * @param searchEnterpriseDTO
     * @return com.xbongbong.pro.searchcustomer.pojo.vo.SearchCustomerVO
     * @author 石安
     * @date 2019-08-15
     */
    SearchCustomerVO search(@Valid SearchEnterpriseDTO searchEnterpriseDTO) throws XbbException;

    /**
     * 获取企业基本信息
     * @param searchEnterpriseDTO
     * @return com.xbongbong.pro.searchcustomer.pojo.vo.SearchCustomerVO
     * @author 石安
     * @date 2019-08-15
     */
    SearchCustomerVO baseInfo(@Valid SearchEnterpriseDTO searchEnterpriseDTO) throws XbbException;

    /**
     * 是否有企业基本信息
     * @param keyword
     * @return boolean
     * @author 石安
     * @date 2019-11-15
     */
    JSONObject haveEnterpriseInfo(String keyword) throws XbbException;

    /**
     * 获取跳转栗子详情的方式
     * @param searchEnterpriseDTO
     * @return com.xbongbong.pro.searchcustomer.pojo.vo.JumpClueDetailVO
     * @author 石安
     * @date 2019-11-18
     */
    JumpClueDetailVO getClueDetail(@Valid SearchEnterpriseDTO searchEnterpriseDTO) throws XbbException;

    /**
     *  员工离职后，清除员工使用搜客的权限
     * @param corpId
     * @param userId
     * @return void
     * @author 石安
     * @date 2019-11-05
     */
     void removeSoukePosition(String corpId, String userId) throws XbbException;

    /**
     * 处理客户详情页是否有栗子详情页图标
     * @param paasFormDataEntityExt
     * @return void
     * @author 石安
     * @date 2019-08-26
     */
    String handelDetailClue(PaasFormDataEntityExt paasFormDataEntityExt);
}
